-- GENERATED SPELL FOR [Crypt Crawler] --


function spell0_10412(pUnit, Event) --@Crypt Scarabs,n/a--
pUnit:FullCastSpellOnTarget(31601,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10412', 1500, 1)
end

function spell1_10412(pUnit, Event) --@Enveloping Web,n/a--
pUnit:FullCastSpellOnTarget(15471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10412', 8283, 1)
end

function Sorts_10412(pUnit, Event)
local choix_sorts_10412 = math.random(0, 1)
if choix_sorts_10412 == 0 then
pUnit:RegisterEvent('spell0_10412', 1, 1)
end
if choix_sorts_10412 == 1 then
pUnit:RegisterEvent('spell1_10412', 1, 1)
end
end

function mob10412_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10412', math.random(1500, 3000), 1)
end

function mob10412_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10412_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10412_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10412, 1, 'mob10412_Action')
RegisterUnitEvent(10412, 2, 'mob10412_Leave')
RegisterUnitEvent(10412, 3, 'mob10412_Kill')
RegisterUnitEvent(10412, 4, 'mob10412_Die')
